package org.alis.smallcc.designpatterns.behavior.state;

import org.alis.smallcc.designpatterns.behavior.memento.Originator;
import org.apache.commons.lang3.StringUtils;

public class SuspendState implements State{

	@Override
	public String currentState() {
		return "暂停状态";
	}

	@Override
	public boolean canChanage(Originator context) {
		if(StringUtils.equals(context.getState(),"停止状态")) {
			System.out.println("停止状态不允许暂停");
			return false;
		}
		return true;
	}

}
